import request from '@/utils/request'

export default {
  // 获取区域树
  districtTree: () => {
    return request({
      url: '/location/gps/districtTree',
      method: 'get'
    })
  },
  // 获取组织树
  deptTree: () => {
    return request({
      url: '/location/gps/deptTree',
      method: 'get'
    })
  },
  // 获取类型树
  carTypeTree: () => {
    return request({
      url: '/location/gps/carTypeTree',
      method: 'get'
    })
  },
  // 获取品牌列表
  carBrandList: () => {
    return request({
      url: '/location/gps/carBrandList',
      method: 'get'
    })
  },
  // 获取型号列表
  carModelList: () => {
    return request({
      url: '/location/gps/carModelList',
      method: 'get'
    })
  },
  // 获取型号列表分页
  carModelListPage: (key) => {
    return request({
      url: '/location/gps/carModelListPage',
      method: 'get',
      params:key
    })
  },
  //在/离线数量统计
  count: () => {
    return request({
      url: '/location/gps/count',
      method: 'get'
    })
  },
  //获取车辆树信息
  groupCarTree: (key) => {
    return request({
      url: '/location/gps/groupCarTree',
      method: 'get',
      params: key
    })
  },
  //按离线时间统计数量
  offlineCount: (key) => {
    return request({
      url: '/location/gps/offlineCount/'+key,
      method: 'get',
    })
  },
  //通过组织获取实时位置
  realTimeGps: (data) => {
    return request({
      url: '/location/gps/realTimeGps',
      method: 'post',
      data: data
    })
  },
  //通过区域获取实时位置
  realTimeCity: (data) => {
    return request({
      url: '/location/gps/realTimeCity',
      method: 'post',
      data: data
    })
  },
  // 历史轨迹表数据
  trackData: (data) => request({
    url: '/location/track/trackData',
    method: 'post',
    data: data
  }),



}





